/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * devTestStrBox.java
 *
 * Created on Jul 30, 2009, 2:07:18 AM
 */

package Falcon;

import org.jdesktop.application.Action;

/**
 *
 * @author Joe
 */
public class devTestPktBox extends javax.swing.JDialog {

    /** Creates new form devTestStrBox */
    public devTestPktBox(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }



    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        testStrDescLabel = new javax.swing.JLabel();
        testStrLabel = new javax.swing.JLabel();
        sendTestStrButton = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        devTestHdr = new javax.swing.JTextArea();
        testStrLabel1 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        devTestData = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(Falcon.FalconMainApp.class).getContext().getResourceMap(devTestPktBox.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N
        setResizable(false);

        testStrDescLabel.setText(resourceMap.getString("testStrDescLabel.text")); // NOI18N
        testStrDescLabel.setName("testStrDescLabel"); // NOI18N

        testStrLabel.setText(resourceMap.getString("testStrLabel.text")); // NOI18N
        testStrLabel.setName("testStrLabel"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(Falcon.FalconMainApp.class).getContext().getActionMap(devTestPktBox.class, this);
        sendTestStrButton.setAction(actionMap.get("sendTestStr")); // NOI18N
        sendTestStrButton.setText(resourceMap.getString("sendTestStrButton.text")); // NOI18N
        sendTestStrButton.setName("sendTestStrButton"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        devTestHdr.setColumns(20);
        devTestHdr.setRows(5);
        devTestHdr.setText(resourceMap.getString("devTestHdr.text")); // NOI18N
        devTestHdr.setName("devTestHdr"); // NOI18N
        jScrollPane1.setViewportView(devTestHdr);

        testStrLabel1.setText(resourceMap.getString("testStrLabel1.text")); // NOI18N
        testStrLabel1.setName("testStrLabel1"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        devTestData.setColumns(20);
        devTestData.setRows(5);
        devTestData.setText(resourceMap.getString("devTestData.text")); // NOI18N
        devTestData.setName("devTestData"); // NOI18N
        jScrollPane2.setViewportView(devTestData);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(testStrLabel)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 632, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 632, Short.MAX_VALUE)
                    .addComponent(testStrLabel1)
                    .addComponent(testStrDescLabel, javax.swing.GroupLayout.Alignment.TRAILING, 0, 0, Short.MAX_VALUE)
                    .addComponent(sendTestStrButton, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(testStrLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(testStrLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(testStrDescLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(sendTestStrButton)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    @Action
    public void sendTestStr() {
        PacketExchange.getInstance().spoofIncomingPacket(devTestHdr.getText(),devTestData.getText());

    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea devTestData;
    private javax.swing.JTextArea devTestHdr;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JButton sendTestStrButton;
    private javax.swing.JLabel testStrDescLabel;
    private javax.swing.JLabel testStrLabel;
    private javax.swing.JLabel testStrLabel1;
    // End of variables declaration//GEN-END:variables

}
